class Good {
  String category;
  double price;

  //默认构造函数
  Good(this.category, this.price);

  void printInfo() {
    print('${this.category}---${this.price}');
  }

}

void main() {
  Good good = new Good('beer', 6.0);
  good.printInfo();
}